// import '../../global.less';
import style from "./index.less";

import { useDispatch, useSelector, ArticleModelState } from 'umi';
import { useEffect } from 'react';
import { IArticleState } from '@/types';
export default function recommendread() {
  const dispatch = useDispatch();
  const { articleState } = useSelector((state: { article: ArticleModelState }) => ({ ...state.article }));
  // console.log(articleComment);
  // 发起请求
  useEffect(() => {
    dispatch({
      type: 'article/getArticleState'
    })
  }, [])
  return (
    <div>
      <div className={style.flet_title}>
        <span>文章标签</span>
      </div>
      <ul className={style.sidebarul_2}>
        {articleState.map((item: IArticleState) => {
          return <li key={item.id}>
            <a> {item.label}  [{item.articleCount}]</a>
          </li>
        })}
      </ul>
    </div>



  );
}
